package com.bsj.power.common.config.global;

import java.util.List;

public class JsonResultExpend<T> extends JsonResult<T> {

    /**
     * 类型：0正常返回，1是报警，2是视频
     */
    private int type;

    private String id;
    /**
     * 用户id集合
     */
    private List<Long> userList;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public List<Long> getUserList() {
        return userList;
    }

    public void setUserList(List<Long> userList) {
        this.userList = userList;
    }

    public JsonResultExpend() {

    }

    public JsonResultExpend(JsonResultEnum response, T data, int typeNow) {
        setCode(response.getCode());
        setMsg(response.getMsg());
        setData(data);
        this.type = typeNow;
    }



    public static JsonResultExpend successAlarm(Object data) {
        return new JsonResultExpend(JsonResultEnum.SUCCESS, data, 1);
    }

    public static JsonResultExpend successMedia(Object data) {
        return new JsonResultExpend(JsonResultEnum.SUCCESS, data, 2);
    }
}
